package group2.service.impl;

import group2.mapper.AdminMapper;
import group2.model.Admin;
import group2.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 周祖航
 * @date 2020/8/17 001715:10
 **/
@Service("adminService")
public class AdminServiceImpl implements  AdminService{

    @Autowired
    AdminMapper adminMapper;

    @Override
    public Admin adminForLogin(Admin admin) {
        return adminMapper.adminForLogin(admin);
    }
    //查所有
    @Override
    public List<Admin> adminForSelectAll(){
        return adminMapper.adminForSelectAll();
    }
    //增
    @Override
    public boolean adminForAdd(Admin admin){
        return adminMapper.adminForAdd(admin);
    }
    //删
    @Override
    public boolean adminForDelete(int adminId){
        return adminMapper.adminForDelete(adminId);
    }
    //改
    @Override
    public boolean adminForUpdate(Admin admin){
        return adminMapper.adminForUpdate(admin);
    }

}
